package com.itic.appbase.framework.type;

public enum CouponType {
	pack("red","红包"),coupon("coupon","优惠券"),fullcut("fullcut","满减");
	private String type;
	private String name;
	CouponType(String type, String name) {
		this.type = type;
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static CouponType getCouponType (String type) {
		CouponType couponType = null;
		switch (type) {
		case "red":
			couponType = couponType.pack;
			break;
		case "coupon":
			couponType = couponType.coupon;
			break;
		case "fullcut":
			couponType = couponType.fullcut;
			break;
		}
		return couponType;
	}
	
	
}
